<include file="Public/sui_header" />
<volist name="list" id="vo">
    <div class="card">
        <div class="card-header">
            <span class="fa fa-globe"></span> {$vo['name']}定制的{:D('Region')->find($vo['region_id'])['name']}{:D('FundingType')->find($vo['type'])['long_name']}
        </div>
        <div class="card-content">
            <if condition="$vo['funding_id']">
                <div class="card-content-inner" onclick="window.location.href='{:U(\'Funding/detail\', [\'id\'=>$vo[\'funding_id\']])}'">
            <else/>
                <div class="card-content-inner">
            </if>
            
                <div class="row" style="padding-left: 0.5rem;">
                    定制时间：{$vo['create_time']|date="Y-m-d H:i:s", ###}
                    <if condition="$vo['state'] neq '待处理'"><br/> 处理时间：{$vo['update_time']|date="Y-m-d H:i:s", ###}</if>
                    <br/> 订单状态：{$vo['state']} 
                </div>
            </div>
        </div>
        <div class="card-footer">
            <if condition="$vo['state'] eq '待处理'">
                <a href="tel:{$vo['tel']}" class="button"><span class="icon icon-phone"></span> 联系</a>
            <else/>
                <a href="tel:{$vo['tel']}" class="button"><span class="icon icon-phone"></span> 联系</a>
                <php>
                    $fundingInfo = D('Funding')->find($vo['funding_id']);
                </php>
                <if condition="$fundingInfo['state'] neq '待审核'">
                    <!-- <a href="{:U('Funding/detail', ['id'=>$vo['funding_id']])}" class="button"><span class="fa fa-file-text-o"></span> 详情</a> -->

                    <a href="{:U('Funding/contract', ['id'=>$vo['id'], 'transaction_type'=>'定制'])}" class="button"><span class="fa fa-file-text-o"></span> 合同</a>
                    <if condition="$vo['state'] eq '待支付'">
                        <a href="{:U('Customized/pay', ['id'=>$vo['id']])}" class="button"><span class="fa fa-cc-paypal"></span> 支付</a>
                        <elseif condition="$vo['state'] eq '待成功'" />
<!--                         <a href="{:U('Funding/contract', ['id'=>$vo['id']])}" class="button"><span class="fa fa-cc-paypal"></span> 退款</a> -->
                        <elseif condition="$vo['state'] eq '待评价'" />

                        <a href="{:U('Funding/comment', ['id'=>$vo['id'], 'transaction_type'=>'定制'])}" class="button"><span class="fa fa-thumbs-o-up"></span> 评价</a>
                        <a href="__ROOT__/Shop/Index/register.html" class="button" onclick="return confirm('发起众筹需要注册商家用户，是否确认前往?');"><span class="fa fa-info"></span> 发起</a>
                        <elseif condition="$vo['state'] eq '已完成'" />
                        <a href="{:U('Funding/complaint', ['id'=>$vo['id'], 'transaction_type'=>'定制'])}" class="button"><span class="fa fa-thumbs-o-down"></span> 投诉</a>
                    </if>
                <else/>
                    <a href="#" class="button disabled"><span class="fa fa-clock-o"></span> 审核中</a>
                </if>
            </if>
        </div>
    </div>
</volist>
{$page}
<include file="Public/sui_footer" />
